/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.contacts.v3.model;

import com.google.api.client.util.Key;

/**
 * Storage for URL of the contact's calendar. Attributes {@link #rel} and
 * {@link #label} are mutually exclusive (but one must be specified). Only one
 * CalendarLink can be marked as primary at a time.
 * 
 * @author Nicolas Garnier
 */
public class CalendarLink {

  /** The calendar is a work calendar. */
  public static final String TYPE_WORK = "work";
  /** The calendar is a personal calendar. */
  public static final String TYPE_HOME = "home";
  /** The calendar only shows free-busy information. */
  public static final String TYPE_FREE_BUSY = "free-busy";

  /**
   * Predefined calendar link type. Can be one of {@link #TYPE_WORK},
   * {@link #TYPE_HOME} or {@link #TYPE_FREE_BUSY}.
   */
  @Key("@rel")
  public String type;

  /** User-defined calendar link type. */
  @Key("@label")
  public String label;

  /** Boolean flag denoting the calendar link as primary. */
  @Key("@primary")
  public Boolean primary;

  /** The URL of the calendar. */
  @Key("@href")
  public String href;
}
